//package com.example.alibabanacosdiscoveryclient.controller;
//
//import com.alibaba.fastjson.JSON;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.ai.embedding.EmbeddingRequest;
//import org.springframework.ai.ollama.OllamaChatModel;
//import org.springframework.ai.ollama.OllamaEmbeddingModel;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @author:guoq
// * @date:2024/11/18
// * @descripion:   调试mcp client starer的使用，需要临时注释掉pom依赖及相关的方法
// */
//@RestController
//@Slf4j
//@RequestMapping("/ai")
//@Tag(name="本地大模型")
//public class AIController {
//    @Autowired
//    private OllamaChatModel ollamaChatModel;
//    @Autowired
//    private OllamaEmbeddingModel ollamaEmbeddingModel;
//
//
//    @GetMapping("/chat")
//    @Operation(summary ="简答聊天")
//    public String chat(String message)  {
//        message="{\"role\":\"user\",\"content\":\""+message+"\"}";
//        JSON json = JSON.parseObject(message);
//        String call = ollamaChatModel.call(message);
//        System.out.println("call:"+call);
//        return call;
//    }
////    @GetMapping("/embed")
////    @Operation(summary ="向量转化")
////    public float[] embed(String message)  {
////        float[] embed = ollamaEmbeddingModel.embed(message);
////        return embed;
////    }
//}
